package cn.txun05.csmall.product.controller;

import cn.txun05.csmall.commons.ex.ServiceException;
import cn.txun05.csmall.product.pojo.param.AlbumAddNewParam;
import cn.txun05.csmall.product.pojo.param.AttributeTemplateAddNewParam;
import cn.txun05.csmall.product.service.IAttributeTemplateService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping(value = "/attribute-template",produces = "application/json; charset=utf-8")
@Api(tags = "06.属性模版管理模块")
@Slf4j
public class AttributeTemplateController {
    @Autowired
    private IAttributeTemplateService service;

    AttributeTemplateController(){
        log.debug("AttributeTemplateController()");
    }

    @PostMapping("/add-new")
    @ApiOperation("添加属性模版")
    @ApiOperationSupport(order = 100)
    public String addNew(AttributeTemplateAddNewParam attributeTemplateAddNewParam){

            service.addNew(attributeTemplateAddNewParam);
            return "添加成功";

    }
}
